package com.ligotop.admin.system.controller;


import com.ligotop.admin.system.entity.User;
import com.ligotop.admin.system.service.UserService;
import com.ligotop.core.message.ResponseMessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <p>
 * 系统用户 前端控制器
 * </p>
 *
 * @author yudm
 * @since 2017-09-28
 */
@Controller
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;

    /**
     *
     * @param userId
     * @return
     */
    @ResponseBody
    @RequestMapping("info/{userId}")
    public ResponseMessage findUser(@PathVariable Integer userId){
        User user = userService.selectById(userId);
        return ResponseMessage.ok(user);
    }
	
}
